<script setup lang="ts">
import ByButton from '@/components/ui/ByButton.vue';


defineProps<{
    image?: string;
    title?: string;
    desc?: string;

    btnText?: string;
}>();

defineEmits<{
    btnTap: [];
}>()

</script>

<template>
    <view class="text-center">
        <image v-if="image"
               class="w-[160px] h-[160px]"
               :src="image" />
        <view class="mt-3 text-2xl text-dark">{{ title }}</view>
        <view class="mt-1 text-lg text-[#9F6C3E] whitespace-pre-line">{{ desc }}</view>
    </view>

    <view v-if="btnText"
          class="text-center">
        <ByButton class="mt-5 bg-dark w-[384px] mx-auto"
                  @tap="$emit('btnTap')">
            {{ btnText }}
        </ByButton>
    </view>
</template>